@extends('layouts.app')

@section('content')
    <div class="card">
        <div class="card-header">查看接口</div>
        <div class="card-body">
            <div class="alert alert-secondary" role="alert">
                <p><em>分类 ： {{ $article->type->title }}</em> || 接口名称： {{ $article->name }}</p>
                <h5></h5>
                <pre id="article-show"></pre>
            </div>

        </div>
    </div>
@endsection

@push('js')
    <script>
        $("#list-article").addClass('active');
        let btn = document.querySelector('#article-show');
        console.log(btn);
        let data = @json(json_decode($article->value, true));
        console.log(data, typeof data);
        btn.textContent = JSON.stringify(data, null, " ");
    </script>
@endpush


